package com.itheima.features.collections;

import java.util.Collections;
import java.util.HashMap;
import java.util.Map;

public class CollectionsDemo02 {

    public static void main(String[] args) {

        HashMap<String, String> stringStringHashMap = new HashMap<>();

        stringStringHashMap.put("避尘", "忘机");
        stringStringHashMap.put("随便", "陈情");
        stringStringHashMap.put("紫电", "三毒");

        Map<String, String> stringStringMap = Collections.unmodifiableMap(stringStringHashMap);

//        stringStringMap.put("难平", "悯善");
        stringStringMap.remove("紫电");

        stringStringMap.forEach((key, value) -> System.out.println(key + "---" + value));
    }
}
